package com.testMvc.testAop1;

import java.lang.reflect.Proxy;

public class interTest {
    public static void main(String[] args) {
        interTest i= new interTest();
        System.out.println(i.getClass().getName());
    }

    public static void test1() {
        Inter1 a = new inter1Impl();
        a = (Inter1) Proxy.newProxyInstance(a.getClass().getClassLoader(), a.getClass().getInterfaces(), new interAop<>(a));
        a.speak();
    }

    public static void test2() {
        Inter1 a = (Inter1) new interAopM().getInstance(inter1Impl.class);
        a.speak();
    }
}
